#include <stdio.h>
#include <string.h>
 
int main()
{
    FILE *file = fopen("./test.txt", "r");
    if(file == NULL)
    {
        printf("open error!\n");
        return 0;
    }
    char buf[1024] = {0};
    while(fgets(buf, 1024, file) != NULL)
    {
        printf("%s", buf);
    }
    fclose(file);
    return 0;
}